<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script type="text/javascript" src="__PUBLIC__/app/js/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/app/js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="__PUBLIC__/app/css/class.css" />
		<link rel="stylesheet" href="__PUBLIC__/app/css/main.css" />
		<link rel="stylesheet" href="__PUBLIC__/app/css/swu.css" />
		<link rel="stylesheet" href="__PUBLIC__/app/css/default.css" />
		<link rel="stylesheet" href="__PUBLIC__/app/css/bootstrap.min.css" />
		<link rel="stylesheet" href="__PUBLIC__/app/css/bootstrap-theme.css" />
	</head>

	<body>

		<!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
		<div class="row">
			<div class="col-xs-12">

				<div id="center">
					<div class="content_padtb20 col-xs-12">
						<div class="column_border_340 col-xs-5">
							<h4 class="twoNav_title">
								<img src="__PUBLIC__/app/images/CLASS.png" style="width: 40%;"/>
								<span class="icoNav_9" style="float: left; margin-top: -40%; margin-left: 25%;">辅导目录</span>
							</h4>
							
							<dl class="bookNav_list">
								<volist name="section" id="sect">
									<if condition="$sect['parentid']==0">
									<dt name="zj" id="{$sect.sectionid}" onclick="showHideZj({$sect.sectionid});">章　<span class="chapterNum">{$i}</span>第{$i}章    {$sect.chname}</dt>
										<dd id="zj_{$sect.sectionid}">
											<ul>
												<volist name="section" id="sec" key="k">
												<if condition="$sec['parentid']==$sect['sectionid']">
												<li class="">
													<a href="javascript:;" onclick="addthing({$sect.sectionid});">{$sect.chname}</a>
												</li>
												</if>
												</volist>
											</ul>
										</dd>
									</if>
								</volist>
							</dl>
						</div>

						<script>
							var zjid = 0;
							$("dt[name='zj']").each(function() {
								var id = $(this).attr("id");
								try {
									$("#" + id).removeClass("navClose");
									$("#" + id).removeClass("navOpen");
									$("#zj_" + id).removeClass("display_no");
								} catch(e) {}
								if(parseInt(id) == parseInt(zjid)) {
									$("#" + id).attr("title", "收起");
									$("#" + id).addClass("navOpen");
									$("#zj_" + id).removeClass("display_no");
								} else {
									$("#" + id).attr("title", "展开");
									$("#" + id).addClass("navClose");
									$("#zj_" + id).addClass("display_no");
								}
							});

							function showHideZj(id) {
								var c = $("#" + id).attr("class");
								try {
									$("#" + id).removeClass("navClose");
									$("#" + id).removeClass("navOpen");
									$("#zj_" + id).removeClass("display_no");
								} catch(e) {}
								if(c == "navOpen") {
									$("#" + id).attr("title", "展开");
									$("#" + id).addClass("navClose");
									$("#zj_" + id).addClass("display_no");
								} else {
									$("#" + id).attr("title", "收起");
									$("#" + id).addClass("navOpen");
									$("#zj_" + id).removeClass("display_no");
								}
								$('#mic li').remove();
								$('#ppt li').remove();
								$('#word li').remove();
								addthing(id);
							};
							function addthing(id) {
						$.ajax({
							type: 'POST',
							url: '',
							dataType: 'json',
							data:{
								id:id,
							},
							success: function(data){
								var m=0;
								var p=0;
								var w=0;
								for(var i=0;i<data.length;i++){
									if(data[i].rescode==0 && m<=7){
										$("#mic").append(" <li><a href='__APP__/Home/Index/video/id/"+data[i].resid+".html'>"+ data[i].resname +"</a></li>");
										m++;
									}else if(data[i].rescode==1&&p<=7){
										$("#ppt").append("<li><img style='width:25px;height:25px;float:left;' src='__PUBLIC__/images/ppt.png' />  <a href='http://view.officeapps.live.com/op/view.aspx?src=ydl.loseboy.cn/"+data[i].respath+"'>"+ data[i].resname +"</a></li>");
										p++;
									}else if(data[i].rescode==2&&w<=7){
										$("#word").append(" <li><a href='http://view.officeapps.live.com/op/view.aspx?src=ydl.loseboy.cn/"+data[i].respath+"'>"+ data[i].resname +"</a></li>");
										w++;
									}else{
										break;
									}
								}
							},
							error:function(data) {
								
							},
						});
					}
						</script>

						<div class="columns col-xs-7">
							<div class="column_640 right">
								<div class="twoTab_content" id="msg_1">
									<img src="__PUBLIC__/app/images/play.png" / style="position: absolute;">
									<h4 class="title_bgBlue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;微课</h4>
									<div class="border_bottom_640">
										<div class="intro_course">
											<ul id="mic">
												
											</ul>
										</div>
									</div>
								</div>
							</div>

							<div class="column_640 right">
								<div class="twoTab_content" id="msg_1">
									<img src="__PUBLIC__/app/images/data.png" / style="position: absolute; margin-top: 4px; margin-left: 2px;">
									<h4 class="title_bgBlue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PPT</h4>
									<div class="border_bottom_640">
										<div class="intro_courses">
											<ul id="ppt">
												
											</ul>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>